/*     */ package com.qmsk.business.info.shop.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.basic.MapUtils;
/*     */ import com.utils.gson.in.GsonHeadManyRows;
/*     */ import com.utils.gson.in.GsonHeadOneRow;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class ShopDAO extends SupportDAO
/*     */ {
/*     */   public Long getOutIdOfId(Long shopId)
/*     */     throws SQLException
/*     */   {
/*  28 */     return queryForLong("selectOutIdOfId", new Object[] { shopId }, Long.valueOf(0L));
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonPage(Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  33 */     Object[] params = null;
/*  34 */     return getGsonOfParams("selectSqlOfAll", 
/*  35 */       "selectCountSqlOfAll", "selectJsonOfAll", params, nPageIdx, 
/*  36 */       nPageSize);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfCityId(Integer cityId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  41 */     Object[] params = { cityId };
/*  42 */     return getGsonOfParams("selectSqlOfCityID", "selectCountSqlOfCityID", 
/*  43 */       "selectJsonOfCityID", params, nPageIdx, nPageSize);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfProvinceId(Integer provinceId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  48 */     getGsonPage(nPageIdx, nPageSize);
/*  49 */     Object[] params = { provinceId };
/*  50 */     return getGsonOfParams("selectSqlOfProvinceID", "selectCountSqlOfProvinceID", 
/*  51 */       "selectJsonOfProvinceID", params, nPageIdx, nPageSize);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfRegionId(Integer regionId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  56 */     getGsonPage(nPageIdx, nPageSize);
/*  57 */     Object[] params = { regionId };
/*  58 */     return getGsonOfParams("selectSqlOfRegionID", "selectCountSqlOfRegionID", 
/*  59 */       "selectJsonOfRegionID", params, nPageIdx, nPageSize);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfAll(Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  64 */     Map params = null;
/*  65 */     return getGsonOfParams("selectSqlOfAll", 
/*  66 */       "selectCountSqlOfAll", "selectJsonOfAll", params, nPageIdx, nPageSize);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfOpt(Map<String, Object> params, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  71 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, nPageSize, 
/*  72 */       true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfId(Long id, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  77 */     Map params = new HashMap();
/*  78 */     params.put("id", id);
/*  79 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, nPageSize, 
/*  80 */       true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfOptChild(Map<String, Object> params, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  85 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, nPageSize, 
/*  86 */       true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfOptRoot(Map<String, Object> params, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  91 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, nPageSize, 
/*  92 */       false);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfOptPid(Map<String, Object> params, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  97 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, nPageSize, 
/*  98 */       true);
/*     */   }
/*     */ 
/*     */   public GsonHeadManyRows getShopOfAll() throws SQLException {
/* 102 */     Map params = new HashMap();
/* 103 */     return getManyRowsOfParams("selectSqlOfAll", params);
/*     */   }
/*     */ 
/*     */   public int updateOutId(Long shopId, Long outId) throws SQLException {
/* 107 */     String[] head = { "outId", "id" };
/* 108 */     Object[] data = { outId, shopId };
/* 109 */     GsonHeadOneRow g = new GsonHeadOneRow(head, data);
/* 110 */     return updateJsonOneRow(g);
/*     */   }
/*     */ 
/*     */   public int updateImgUrl(String fldName, String imgUrl, Long id) throws SQLException
/*     */   {
/* 115 */     String[] head = { fldName, "id" };
/* 116 */     Object[] data = { imgUrl, id };
/* 117 */     GsonHeadOneRow g = new GsonHeadOneRow(head, data);
/* 118 */     return updateJsonOneRow(g);
/*     */   }
/*     */ 
/*     */   public GsonHeadManyRows getShopOfGroup() throws SQLException {
/* 122 */     Map params = new HashMap();
/* 123 */     return getManyRowsOfParams("selectSqlForShopMap", params);
/*     */   }
/*     */ 
/*     */   public int updateIndexUrl(Long shopId, String url) throws SQLException {
/* 127 */     String[] heads = { "idxUrl", "id" };
/* 128 */     Object[] datas = { url, shopId };
/* 129 */     return updateJsonOneRow(new GsonHeadOneRow(heads, datas));
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow getItudeSqlOfId(Long shopId) throws SQLException {
/* 133 */     Map params = new HashMap();
/* 134 */     MapUtils.addToMap(params, "id", shopId);
/* 135 */     return getOneRowOfParams("getItudeSqlOfId", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfAllShop(Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/* 140 */     Map params = new HashMap();
/* 141 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, nPageSize, 
/* 142 */       true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst findRecommendShopList(Map<String, Object> params, Integer nPageIdx, Short nPageSize)
/*     */     throws SQLException
/*     */   {
/* 156 */     return getGsonOfParams("selectSqlOfRecommendShopAll", params, 
/* 157 */       nPageIdx, nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfshopId(Long shopId) throws SQLException {
/* 161 */     Map params = new HashMap();
/* 162 */     params.put("id", shopId);
/* 163 */     return getGsonOfParams("selectSqlOfAll", params, false);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.info.shop.dao.ShopDAO
 * JD-Core Version:    0.5.3
 */